import httpbase from "@/util/http.js";


//新增方法
export const adduserdata = (username, nickname, email, phone, address) => {
  return httpbase({
    url: '/user/',
    method: 'post',
    data: {
      username, nickname, email, phone, address
    },
  })
}
//删除方法
export const deluserdata = (id) => {
  return httpbase({
    url: `/user/${id}`,
    method: 'delete',
  })
}

//  批量删除
export const delalldataofpeople = (allpws) => {
  return httpbase({
    url: '/user/delalldataofpeople',
    method: 'delete',
    data: {
      allpws
    },
  })
}

//编辑修改
export const edituserdata = (username, nickname, email, phone, address, id) => {
  return httpbase({
    url: '/user/',
    method: 'post',
    data: {
      username,
      nickname,
      email,
      phone,
      address,
      id
    },
  })
 
}


//分页器
export const feny = (pageNum,pageSize,username,phone,address) => {
  return httpbase({
    url: '/user/page',
    method: 'get',
    params:{
      pageNum,
      pageSize,
      username,
      phone,
      address
    }
  })
}